Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update retry handler used by Pro Client #1238

Merged
merged 29 commits into from
Dec 5, 2024
Merged

Conversation

atavism
Copy link
Contributor

@atavism atavism commented Nov 22, 2024

This PR updates the retry handler for user creation, originally implemented for Android, to work across multiple platforms, including desktop

@atavism atavism marked this pull request as draft November 22, 2024 05:31
@atavism atavism changed the title Use retry handler for user creation on desktop Improve retry handling in Pro Client Nov 22, 2024
@atavism atavism changed the title Improve retry handling in Pro Client Update retry handler used by Pro Client Nov 22, 2024
@atavism atavism marked this pull request as ready for review December 1, 2024 16:27
@atavism
Copy link
Contributor Author

atavism commented Dec 2, 2024

@jigar-f I'm testing this now, but it would be great if you could start taking a look!

@jigar-f
Copy link
Contributor

jigar-f commented Dec 2, 2024

@atavism I'll give it look tomorrow, thanks

Copy link
Contributor

@jigar-f jigar-f left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have created PR #1246 for this fix

desktop/auth.go Show resolved Hide resolved
desktop/lib.go Outdated Show resolved Hide resolved
internalsdk/android.go Outdated Show resolved Hide resolved
@atavism atavism requested a review from jigar-f December 4, 2024 22:03
final isLevelPro = userLevel != null && userLevel == 'pro';
final isStatusPro = userStatus != null && userStatus == 'active';
if (isLevelPro || isStatusPro) {
sessionModel.proUserNotifier.value = true;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We also need to make sure to set it to false.

Copy link
Contributor

@jigar-f jigar-f left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just pushed some changes.

@@ -109,44 +107,44 @@ func (app *App) IsProUserFast(uc common.UserConfig) (isPro bool, statusKnown boo
// It loops forever in 10 seconds interval until the user is fetched or
// created, as it's fundamental for the UI to work.
func (app *App) servePro(channel ws.UIChannel) error {
chFetch := make(chan bool)
ctx := context.Background()
go func() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@atavism We were creating two users like in android, We don't need this anymore, Since we are creating user in afterStart

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for removing this!

@atavism
Copy link
Contributor Author

atavism commented Dec 5, 2024

Just pushed some changes.

Thanks, looks great to me! Merging..

@atavism atavism merged commit c63862b into main Dec 5, 2024
2 checks passed
@atavism atavism deleted the atavism/updates-pro-client branch December 5, 2024 16:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants